import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { AppSettingsComponent } from './app-settings.component';
import { GeneralSettingComponent } from './general-setting/general-setting.component';
import { RemoteSettingComponent } from './remote-setting/remote-setting.component';

const routes: Routes = [
    {
        path: 'app-settings',
        component: AppSettingsComponent,
        data: {
            breadcrumb: 'App Settings'
        },
        children: [
            {
                path: '',
                redirectTo: 'remote-setting',
                pathMatch: 'full'
            },
            {
                path: 'general-setting',
                component: GeneralSettingComponent,
                data: {
                    breadcrumb: 'General Setting'
                }
            },
            {
                path: 'remote-setting',
                component: RemoteSettingComponent,
                data: {
                    breadcrumb: 'Remote Setting'
                }
            }
        ]
    }
];

@NgModule({
    declarations: [],
    imports: [CommonModule, RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class AppSettingsRoutingModule { }
